--Redzone RPG
--By Kylegar
RZ_TEXTPANEL = {}
RZ_TEXTPANEL.Text = nil
RZ_TEXTPANEL.TextAlign = nil
RZ_TEXTPANEL.Font = nil
RZ_TEXTPANEL.Color = nil


function RZ_TEXTPANEL:Init()
	self.Text = "Hover Over a button to see a Description"
	self.TextAlign = 0
	self.Font = "ScoreboardText"
	self.Color = Color(255,255,255,255)
	
	
end

function RZ_TEXTPANEL:Paint()
	if(self.Align == 0) then
		x = self:GetWide()/2
	else
		x = 0
	end
	
	draw.DrawText(self.Text , self.Font , x , 0 , self.Color, self.TextAlign)
	
	

end

function RZ_TEXTPANEL:SetText( text )
	self.Text = text
end

function RZ_TEXTPANEL:GetText()
	return self.Text
end
   
function RZ_TEXTPANEL:SetAlign( align )
	if ( align == 0 || align == 1 ) then
		self.TextAlign = align
	else
		Msg( "Invalid align [" .. align .. "] passed to control!\n" )
	end
end

function RZ_TEXTPANEL:GetAlign()
	return self.TextAlign
end
   
function RZ_TEXTPANEL:SetFont( font )
	self.Font = font
end

function RZ_TEXTPANEL:GetFont()
	return self.Font
end
   
function RZ_TEXTPANEL:SetColor( color )
	if ( string.lower( type( color ) ) != "color" ) then
		Msg( "Invalid color passed to label!\n" )
		return false
	else
		self.Color = color
	end
end

function RZ_TEXTPANEL:GetColor()
	return self.Color
end 



vgui.Register("rz_textpanel" , RZ_TEXTPANEL)
